﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace SWTI_BlackSoft_CSharp.Controllers
{
    public class SecurityController : Controller
    {
        //
        // GET: /Security/
        public ActionResult Login()
        {
            return View();
        }

        
        public JsonResult AccederSistema(string usuario, string password) {
            if (usuario.Equals("admin") && password.Equals("123"))
            {
                Session["LoginUsuario"] = usuario;
                return Json(new { rpt = "1", mensaje = "" });
            }
            else {
                return Json(new { rpt = "0", mensaje = "Usuario incorrecto" });
            }
        }
	}
}